/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.restorator.service.impl;

import java.util.concurrent.Callable;
import org.restorator.dao.base.UserDao;
import org.restorator.dao.implement.RolesDaoImpl;
import org.restorator.dao.implement.UserDaoImpl;
import org.restorator.dao.tx.TransactionManager;
import org.restorator.dao.tx.TransactionManagerJdbc;
import org.restorator.dao.tx.TxManagerJdbc;
import org.restorator.entity.Roles;
import org.restorator.entity.User;
import org.restorator.exception.ServiceException;

/**
 *
 * @author Administrator
 */
public class RolesServiceImpl {
    private RolesDaoImpl rolesDao = new RolesDaoImpl();
    private TransactionManager tx = TxManagerJdbc.INSTANCE;
    
    public Roles get(final Integer integer) throws ServiceException {
            return tx.doInTran(new Callable<Roles>() {
                    public Roles call() throws Exception {
                            return rolesDao.get(integer);
                    }	
            });
    }    
}
